
clear all
log using fpa-bitsaid-appendix-b,replace
version 13.1

//alternative instruments analysis

use fpa-aid_bits_final,clear

//table a1: regional gdp as iv

version 13.1: teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_gdp lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0

outreg2 using bits_aid_t1, label word dec(3) e(n1 n0) replace addtext() noni nor2 ctitle("AIPW") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a2: democracies
///short time horizon

version 13.1: teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_gdp lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&dpi_yio<4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t2, label word dec(3) e(n1 n0) replace ctitle(Democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

version 13.1:teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_gdp lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&dpi_yio>=4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t2, label word dec(3) e(n1 n0) append ctitle(Democracy long) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a3: non-democracies
///short time horizon
teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_gdp lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&dpi_yio<10&dpi_yio!=.&p_polity2<6&p_polity2!=.
outreg2 using bits_aid_t2, label word dec(3) e(n1 n0) append ctitle(Non-democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_gdp lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&dpi_yio>10&dpi_yio!=.&p_polity2<6&p_polity2!=.
outreg2 using bits_aid_t2, label word dec(3) e(n1 n0) append ctitle(Non-democracy long) noni nor2 cttop("AIPW") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a4: regional trade as iv 

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_trade lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0

outreg2 using bits_aid_t3, label word dec(3) e(n1 n0) append ctitle(Non-democracy long) noni nor2 cttop("AIPW") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a5: democracies 
///short time horizon

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_trade lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&dpi_yio<4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t4, label word dec(3) e(n1 n0) replace ctitle(Democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_trade lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&dpi_yio>=4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t4, label word dec(3) e(n1 n0) append ctitle(Democracy long) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a6: non-democracies

///short time horizon
teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_trade lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&dpi_yio<10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t4, label word dec(3) e(n1 n0) append ctitle(Non-democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lln_mean_trade lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&dpi_yio>10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t4, label word dec(3) e(n1 n0) append ctitle(Non-democracy long) noni nor2 cttop("AIPW") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

**use regime-specific measures of time horizon 

//table a7: democracies, use Party of Chief Executive Length of Time in Office

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&p_polity2>=6&p_polity2!=.

su dpi_hlio if e(sample)

///short time horizon

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0& dpi_gpage1<19&dpi_gpage1!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t11, label word dec(3) e(n1 n0) replace cttop(Democracy short) noni nor2  sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0& dpi_gpage1>=19&dpi_gpage1!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t11, label word dec(3) e(n1 n0) append cttop(Democracy long) noni nor2  sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///table a8: non-democracies

///short time horizon
teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&autoc_time_horizon<0.92&autoc_time_horizon!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t12, label word dec(3) e(n1 n0) append cttop(Non-democracy short) noni nor2  sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar) if oecd_i==1&oecd_j==0&autoc_time_horizon>=0.92&autoc_time_horizon!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t12, label word dec(3) e(n1 n0) append cttop(Non-democracy long) noni nor2  sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//extra controls
use fpa-aid_bits_final,clear

set more off
sort dyad year

//table a9: LDV
teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance  lally lunsc_member lcoldwar llnaid) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta colonial_tie lally lunsc_member lcoldwar llnaid) if oecd_i==1&oecd_j==0

outreg2 using bits_aid_ta2, label word dec(3) e(n1 n0) replace noni nor2 cttop("LDV") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a10: jointvotes

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance  lally lunsc_member lcoldwar ljointvotes) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta colonial_tie lally lunsc_member lcoldwar ljointvotes) if oecd_i==1&oecd_j==0

outreg2 using bits_aid_ta2, label word dec(3) e(n1 n0) replace noni nor2 title("Joint Votes") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a11: other aid

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance  lally lunsc_member lcoldwar lln_aid_other) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta colonial_tie lally lunsc_member lcoldwar lln_aid_other) if oecd_i==1&oecd_j==0

outreg2 using bits_aid_ta2, label word dec(3) e(n1 n0) replace noni nor2 title("Other Aid") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a12: donor exports

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance  lally lunsc_member lcoldwar lln_donor) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta colonial_tie lally lunsc_member lcoldwar lln_donor) if oecd_i==1&oecd_j==0
outreg2 using bits_aid_ta2, label word dec(3) e(n1 n0) replace noni nor2 title("Donor Exports") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//talbe a13: human rights

teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance  lally lunsc_member lcoldwar lciri_physint) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta colonial_tie lally lunsc_member lcoldwar lciri_physint) if oecd_i==1&oecd_j==0
outreg2 using bits_aid_ta2, label word dec(3) e(n1 n0) replace noni nor2 title("Human Rights") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

**LDV
//table a14: democracies

//short time horizon
 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar llnaid) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar llnaid) if oecd_i==1&oecd_j==0&dpi_yio<4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t6, label word dec(3) e(n1 n0) replace cttop(Democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar llnaid) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar llnaid) if oecd_i==1&oecd_j==0&dpi_yio>=4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t6, label word dec(3) e(n1 n0) append cttop(Democracy long) noni nor2  sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a15: non-democracies
///short time horizon
 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar llnaid) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar llnaid) if oecd_i==1&oecd_j==0&dpi_yio<10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t6, label word dec(3) e(n1 n0) append cttop(Non-democracy short) noni nor2  sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar llnaid) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar llnaid) if oecd_i==1&oecd_j==0&dpi_yio>10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t6, label word dec(3) e(n1 n0) append cttop(Non-democracy long) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

**joint votes

//table a16: democracies
///short time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar ljointvotes) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar ljointvotes) if oecd_i==1&oecd_j==0&dpi_yio<4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t7, label word dec(3) e(n1 n0) replace cttop(Democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar ljointvotes) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar ljointvotes) if oecd_i==1&oecd_j==0&dpi_yio>=4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t7, label word dec(3) e(n1 n0) append cttop(Democracy long) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a17: non-democracies
//short time horizon
 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar ljointvotes) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar ljointvotes) if oecd_i==1&oecd_j==0&dpi_yio<10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t7, label word dec(3) e(n1 n0) append cttop(Non-democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar ljointvotes) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar ljointvotes) if oecd_i==1&oecd_j==0&dpi_yio>10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t7, label word dec(3) e(n1 n0) append cttop(Non-democracy long) noni nor2 ctitle("AIPW") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

**other aid

//table a18: democracies
///short time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lln_aid_other) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lln_aid_other) if oecd_i==1&oecd_j==0&dpi_yio<4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t8, label word dec(3) e(n1 n0) replace ctitle(Democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lln_aid_other) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lln_aid_other) if oecd_i==1&oecd_j==0&dpi_yio>=4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t8, label word dec(3) e(n1 n0) append cttop(Democracy long) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a19: non-democracies
//short time horizon
 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lln_aid_other) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lln_aid_other) if oecd_i==1&oecd_j==0&dpi_yio<10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t8, label word dec(3) e(n1 n0) append cttop(Non-democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lln_aid_other) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lln_aid_other) if oecd_i==1&oecd_j==0&dpi_yio>10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t8, label word dec(3) e(n1 n0) append cttop(Non-democracy long) noni nor2 ctitle("AIPW") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

**donor exports

//table a20: democracies
///short time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lln_donor) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lln_donor) if oecd_i==1&oecd_j==0&dpi_yio<4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t9, label word dec(3) e(n1 n0) replace cttop(Democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lln_donor) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lln_donor) if oecd_i==1&oecd_j==0&dpi_yio>=4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t9, label word dec(3) e(n1 n0) append cttop(Democracy long) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//table a21: non-democracies
///short time horizon
 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lln_donor) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lln_donor) if oecd_i==1&oecd_j==0&dpi_yio<10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t9, label word dec(3) e(n1 n0) append cttop(Non-democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lln_donor) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lln_donor) if oecd_i==1&oecd_j==0&dpi_yio>10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t9, label word dec(3) e(n1 n0) append cttop(Non-democracy long) noni nor2 ctitle("AIPW") sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

**human rights

//table a22: democracies
///short time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lciri_physint) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lciri_physint) if oecd_i==1&oecd_j==0&dpi_yio<4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t10, label word dec(3) e(n1 n0) replace cttop(Democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lciri_physint) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lciri_physint) if oecd_i==1&oecd_j==0&dpi_yio>=4&dpi_yio!=.&p_polity2>=6&p_polity2!=.

outreg2 using bits_aid_t10, label word dec(3) e(n1 n0) append cttop(Democracy long) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

//talbe a23: non-democracies
///short time horizon
 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lciri_physint) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lciri_physint) if oecd_i==1&oecd_j==0&dpi_yio<10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t10, label word dec(3) e(n1 n0) append ctitle(Non-democracy short) noni nor2 sortvar(r1vs0.lbit_ratf r0.lbit_ratf)

///long time horizon

 teffects aipw (lnaid lp_polity2  lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lgdpgr_i lpta colonial_tie ln_distance lunsc_member lally lcoldwar lciri_physint) ///
(lbit_ratf lag_tbit lp_polity2 lln_gdppc lwdi_gdpgr lwdi_fdiin lwdi_natrr llnpop lconflict lpta lally lunsc_member colonial_tie  lcoldwar lciri_physint) if oecd_i==1&oecd_j==0&dpi_yio>10&dpi_yio!=.&p_polity2<6&p_polity2!=.

outreg2 using bits_aid_t10, label word dec(3) e(n1 n0) append cttop(Non-democracy long) noni nor2  sortvar(r1vs0.lbit_ratf r0.lbit_ratf)


log close






